package com.atguigu.tingshu.album.mapper;

import com.atguigu.tingshu.model.album.TrackStat;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;


@Mapper
public interface TrackStatMapper extends BaseMapper<TrackStat> {
    @Update("update track_info set order_num=order_num-1 where album_id=#{albumId} and order_num > #{orderNum} and is_deleted=0")
    void updateOrderNum(@Param("albumId") Long albumId, @Param("orderNum") Integer orderNum);
}
